<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>


<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
	 <title>My JSP 'pwdupdate.jsp' starting page</title>
	<link rel="stylesheet" type="text/css" href="${pageContext.request.contextPath}/easyui/1.3.4/themes/default/easyui.css" />
	<link rel="stylesheet" type="text/css" href="${pageContext.request.contextPath}/css/wu.css" />
	<link rel="stylesheet" type="text/css" href="${pageContext.request.contextPath}/css/icon.css" />
	<script type="text/javascript" src="${pageContext.request.contextPath}/js/jquery-1.8.0.min.js"></script>
	<script type="text/javascript" src="${pageContext.request.contextPath}/easyui/1.3.4/jquery.easyui.min.js"></script>
	<script type="text/javascript" src="${pageContext.request.contextPath}/easyui/1.3.4/locale/easyui-lang-zh_CN.js"></script>
 </head>
  <script type="text/javascript">
  	$(function(){
  		var msg = $("#msg").val();
			    if(msg!=""){
				$.messager.show({
					title:'消息',
					msg:msg
				});
				$("#msg").val("");
			    }
  		$('#win').window({   
		    width:600,   
		    height:400,   
		    modal:true,
		    title:'修改密码',  
		});	
  	})
  	$(function() {
	
		$("#firstpwd").blur(function() {
			var firstpwd = $("#firstpwd").val();
			if (firstpwd==""||firstpwd==null) {
				$("#firstpwd_mess").html("密码不能为空!");
			}else{
				$("#firstpwd_mess").html("");
			}
		});
		$("#firstpwd").focus(function() {
				$("#firstpwd_mess").html("");
		});
		
		
		
		$("#firstpwd2").blur(function() {
			var firstpwd2 = $("#firstpwd2").val();
			if (firstpwd2==""||firstpwd2==null) {
				$("#firstpwd2_mess").html("新密码不能为空");
			}else{
				$("#firstpwd_mess").html("");
			}
		});
		$("#firstpwd2").focus(function() {
				$("#firstpwd2_mess").html("");
		});
		
		$("#firstpwd3").blur(function() {
			var firstpwd3= $("#firstpwd3").val();
			if (firstpwd3==""||firstpwd3==null) {
				$("#firstpwd3_mess").html("请重复输入新密码");
			}else{
				$("#firstpwd3_mess").html("");
			}
			var firstpwd2 = $("#firstpwd2").val();
			if(firstpwd3!=firstpwd2){
			$("#firstpwd3_mess").html("新密码两次输入不一致请从新输入！");
			}
		});
		$("#firstpwd3").focus(function() {
				$("#firstpwd3_mess").html("");
		});

	})
</script>
  <body>
  	<div id="win">
  		<form action="${pageContext.request.contextPath}/user?op=pwdupdate" method="post">
    	<p>
						旧&nbsp;密&nbsp;码:
						<input type="password" name="pwd" id="firstpwd"  style="height: 25px;width:200px"/>
						<b style="color: red;">&nbsp;*</b>
						<span id="firstpwd_mess"></span>
					</p>
					<p>
						新&nbsp;密&nbsp;码:
						<input type="password" name="newpwd"  id="firstpwd2" style="height: 25px;width:200px"/>
					<b style="color: red;">&nbsp;*</b>
					<span id="firstpwd2_mess"></span>
					</p>
					<p>
						确认新密码:
						<input type="password" name="newpwd2" id="firstpwd3" style="height: 25px;width:182px"/>
					<b style="color: red;">&nbsp;*</b>
					<span id="firstpwd3_mess"></span>
					</p>
					<input type="hidden" name="id" value="${sys_user.id }"/>
				<input type="submit" value="确定修改">
    </form> 
    			<input type="hidden" id="msg" value="${msg }">
  	</div>  
  </body>
</html>
